<!DOCTYPE html>
<html>
<head th:include="common/header_css::header('霸王餐小程序后台管理-','%mfile')"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div th:replace="common/toolbar::toolbar('管理')"></div>
        <div th:replace="common/search::search('%add')"></div>
    </div>
</div>

<!--添加DisplayFenlei模态框-->
<div id="modal-add-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">添加</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="aform" method="post" class="form-horizontal" action="add"
                                      onsubmit="return checkAdd()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">分类</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" id="categorysel"
                                                            onchange="categoryChange(this.value)">
                                                        <option th:each="c:${cates}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                        <option value="1">店家推荐</option>
                                                        <option value="2">拼团商品</option>
                                                        <option value="3">砍价商品</option>
                                                        <option value="4">限时秒杀商品</option>
                                                        <option value="5">爆款商品</option>
                                                        <option value="6">抽奖商品</option>
                                                        <option value="7">预约服务</option>
                                                        <option value="8">实物商品</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">分类显示名</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="name" id="name2" type="text" readonly maxlength="30" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">分类别名</label>
                                                <div class="col-sm-8">
                                                    <input type="text" name="showname" value="" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">展示分类类别</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="type">
                                                        <option value="0">全部商品</option>
                                                        <option value="1">店家推荐</option>
                                                        <option value="2">拼团商品</option>
                                                        <option value="3">砍价商品</option>
                                                        <option value="4">限时秒杀商品</option>
                                                        <option value="5">爆款商品</option>
                                                        <option value="6">抽奖商品</option>
                                                        <option value="7">预约服务</option>
                                                        <option value="8">实物商品</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航页类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="mtype">
                                                        <option value="1">tab类型</option>
                                                        <option value="2">page页类型</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航路径*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="mpath" value="/pages/category/category" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航键</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="mkey" value="cid" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航值
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="mval" value="" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">列头样式*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="headType">
                                                        <option value="1">2X2版式</option>
                                                        <option value="2">1X1版式</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">列表样式*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="listtype">
                                                        <option value="1">2X2版式</option>
                                                        <option value="2">1X1版式</option>
                                                        <option value="3">5X1版式</option>
                                                        <option value="4">750Xx版式</option>
                                                        <option value="5">营销活动版</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否显示列表*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="show">
                                                        <option value="0">不显示</option>
                                                        <option value="1">显示</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">排序</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="sort2" name="sort" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">显示图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfilepic" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-add-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="hidpic" name="pic" type="hidden" value=""/>
                                    <input id="hidcid" name="cid" type="hidden" value=""/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--修改DisplayFenlei模态框-->
<div id="modal-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <h3 class="m-t-none m-b">修改</h3>
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-content">
                                <form id="mform" method="post" class="form-horizontal" action="modify"
                                      onsubmit="return checkModify()">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">分类名</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control select2" readonly="">
                                                        <option th:each="c:${cates}" th:value="${c.id}"
                                                                th:text="${c.name}"></option>
                                                        <option value="1">店家推荐</option>
                                                        <option value="2">拼团商品</option>
                                                        <option value="3">砍价商品</option>
                                                        <option value="4">限时秒杀商品</option>
                                                        <option value="5">爆款商品</option>
                                                        <option value="6">抽奖商品</option>
                                                        <option value="7">预约服务</option>
                                                        <option value="8">实物商品</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">分类显示名6</label>
                                                <div class="col-sm-8">
                                                    <input type="text" id="name" name="name" readonly value=""/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">分类别名</label>
                                                <div class="col-sm-8">
                                                    <input type="text" id="showname" name="showname" value=""/>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">展示分类类别</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="type" id="type">
                                                        <option value="0">全部商品</option>
                                                        <option value="1">店家推荐</option>
                                                        <option value="2">拼团商品</option>
                                                        <option value="3">砍价商品</option>
                                                        <option value="4">限时秒杀商品</option>
                                                        <option value="5">爆款商品</option>
                                                        <option value="6">抽奖商品</option>
                                                        <option value="7">预约服务</option>
                                                        <option value="8">实物商品</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航页类型</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="mtype" id="mtype">
                                                        <option value="1">tab类型</option>
                                                        <option value="2">page页类型</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航路径*</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="mpath" id="mpath" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航键</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="mkey" id="mkey" value="" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">导航值
                                                </label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" name="mval" id="mval" value="" />
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">列头样式*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="headType" id="headType">
                                                        <option value="1">普通版式</option>
                                                        <option value="2">图片版式</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">列表样式*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" name="listtype" id="listtype">
                                                        <option value="1">2X2版式</option>
                                                        <option value="2">1X1版式</option>
                                                        <option value="3">5X1版式</option>
                                                        <option value="4">750Xx版式</option>
                                                        <option value="5">营销活动版</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">是否显示列表*</label>
                                                <div class="col-sm-8">
                                                    <select class="form-control" id="show" name="show">
                                                        <option value="0">不显示</option>
                                                        <option value="1">显示</option>
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label class="col-sm-4 control-label">排序</label>
                                                <div class="col-sm-8">
                                                    <input class="form-control" id="sort" name="sort" type="number"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">显示图</label>
                                                <div class="col-sm-10">
                                                    <input id="mfilepic2" name="mfile" type="file" class="file"/>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-4 col-sm-offset-2">
                                            <button class="btn btn-primary" type="submit">保存内容</button>
                                            <button data-toggle="modal" type="button" class="btn btn-white"
                                                    href="#modal-form">取消
                                            </button>
                                        </div>
                                    </div>
                                    <input id="hidpic2" name="pic" type="hidden" value=""/>
                                    <input id="id" name="id" type="hidden" value=""/>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="displayFL-form" class="modal fade" aria-hidden="true">
    <div class="modal-dialog" style="width: 800px;">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">首页栏目分类</label>
                            <div class="col-sm-10">
                                <select class="form-control select2" id="gdcid" name="gdcid">
                                    <option th:each="c:${fenleis}" th:value="${c.id}" th:text="${c.showname}"></option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row" style="margin-top: 20px">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" onclick="savedisplayFL()">保存内容</button>
                        <button data-toggle="modal" type="button" class="btn btn-white" href="#displayFL-form">取消</button>
                        <input id="hidgid" name="id"  type="hidden" value="" />
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div th:include="common/footer_js::footer"></div>
<script src="/js/admin/displayfenlei.js"></script>
</body>
</html>
